3.3.70 \(\int \frac {\tanh ^{-1}(a x)^2}{x (1-a^2 x^2)^2} \, dx\) [270]

Optimal. Leaf size=136 \[ \frac {1}{4 \left (1-a^2 x^2\right )}-\frac {a x \tanh ^{-1}(a x)}{2 \left (1-a^2 x^2\right )}-\frac {1}{4} \tanh ^{-1}(a x)^2+\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}+\frac {1}{3} \tanh ^{-1}(a x)^3+\tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-\tanh ^{-1}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1+a x}\right )-\frac {1}{2} \text {PolyLog}\left (3,-1+\frac {2}{1+a x}\right ) \]

[Out]

1/4/(-a^2*x^2+1)-1/2*a*x*arctanh(a*x)/(-a^2*x^2+1)-1/4*arctanh(a*x)^2+1/2*arctanh(a*x)^2/(-a^2*x^2+1)+1/3*arct
anh(a*x)^3+arctanh(a*x)^2*ln(2-2/(a*x+1))-arctanh(a*x)*polylog(2,-1+2/(a*x+1))-1/2*polylog(3,-1+2/(a*x+1))

________________________________________________________________________________________

Rubi [A]
time = 0.22, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 9, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {6177, 6135, 6079, 6095, 6203, 6745, 6141, 6103, 267} \begin {gather*} \frac {1}{4 \left (1-a^2 x^2\right )}+\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}-\frac {a x \tanh ^{-1}(a x)}{2 \left (1-a^2 x^2\right )}-\frac {1}{2} \text {Li}_3\left (\frac {2}{a x+1}-1\right )-\text {Li}_2\left (\frac {2}{a x+1}-1\right ) \tanh ^{-1}(a x)+\frac {1}{3} \tanh ^{-1}(a x)^3-\frac {1}{4} \tanh ^{-1}(a x)^2+\log \left (2-\frac {2}{a x+1}\right ) \tanh ^{-1}(a x)^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcTanh[a*x]^2/(x*(1 - a^2*x^2)^2),x]

[Out]

1/(4*(1 - a^2*x^2)) - (a*x*ArcTanh[a*x])/(2*(1 - a^2*x^2)) - ArcTanh[a*x]^2/4 + ArcTanh[a*x]^2/(2*(1 - a^2*x^2
)) + ArcTanh[a*x]^3/3 + ArcTanh[a*x]^2*Log[2 - 2/(1 + a*x)] - ArcTanh[a*x]*PolyLog[2, -1 + 2/(1 + a*x)] - Poly
Log[3, -1 + 2/(1 + a*x)]/2

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 6079

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Simp[(a + b*ArcTanh[c*x
])^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Dist[b*c*(p/d), Int[(a + b*ArcTanh[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/
d))]/(1 - c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 6095

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rule 6103

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2)^2, x_Symbol] :> Simp[x*((a + b*ArcTanh[c*x
])^p/(2*d*(d + e*x^2))), x] + (-Dist[b*c*(p/2), Int[x*((a + b*ArcTanh[c*x])^(p - 1)/(d + e*x^2)^2), x], x] + S
imp[(a + b*ArcTanh[c*x])^(p + 1)/(2*b*c*d^2*(p + 1)), x]) /; FreeQ[{a, b, c, d, e}, x] && EqQ[c^2*d + e, 0] &&
 GtQ[p, 0]

Rule 6135

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*d*(p + 1)), x] + Dist[1/d, Int[(a + b*ArcTanh[c*x])^p/(x*(1 + c*x)), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && GtQ[p, 0]

Rule 6141

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[(d + e*x^2)^
(q + 1)*((a + b*ArcTanh[c*x])^p/(2*e*(q + 1))), x] + Dist[b*(p/(2*c*(q + 1))), Int[(d + e*x^2)^q*(a + b*ArcTan
h[c*x])^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, q}, x] && EqQ[c^2*d + e, 0] && GtQ[p, 0] && NeQ[q, -1]

Rule 6177

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_)^(m_)*((d_) + (e_.)*(x_)^2)^(q_), x_Symbol] :> Dist[1/d, Int
[x^m*(d + e*x^2)^(q + 1)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[e/d, Int[x^(m + 2)*(d + e*x^2)^q*(a + b*ArcTanh
[c*x])^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[c^2*d + e, 0] && IntegersQ[p, 2*q] && LtQ[q, -1] && ILtQ[
m, 0] && NeQ[p, -1]

Rule 6203

Int[(Log[u_]*((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan
h[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] - Dist[b*(p/2), Int[(a + b*ArcTanh[c*x])^(p - 1)*(PolyLog[2, 1 - u]/
(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d + e, 0] && EqQ[(1 - u)^2 - (1 - 2
/(1 + c*x))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps

\begin {align*} \int \frac {\tanh ^{-1}(a x)^2}{x \left (1-a^2 x^2\right )^2} \, dx &=a^2 \int \frac {x \tanh ^{-1}(a x)^2}{\left (1-a^2 x^2\right )^2} \, dx+\int \frac {\tanh ^{-1}(a x)^2}{x \left (1-a^2 x^2\right )} \, dx\\ &=\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}+\frac {1}{3} \tanh ^{-1}(a x)^3-a \int \frac {\tanh ^{-1}(a x)}{\left (1-a^2 x^2\right )^2} \, dx+\int \frac {\tanh ^{-1}(a x)^2}{x (1+a x)} \, dx\\ &=-\frac {a x \tanh ^{-1}(a x)}{2 \left (1-a^2 x^2\right )}-\frac {1}{4} \tanh ^{-1}(a x)^2+\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}+\frac {1}{3} \tanh ^{-1}(a x)^3+\tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-(2 a) \int \frac {\tanh ^{-1}(a x) \log \left (2-\frac {2}{1+a x}\right )}{1-a^2 x^2} \, dx+\frac {1}{2} a^2 \int \frac {x}{\left (1-a^2 x^2\right )^2} \, dx\\ &=\frac {1}{4 \left (1-a^2 x^2\right )}-\frac {a x \tanh ^{-1}(a x)}{2 \left (1-a^2 x^2\right )}-\frac {1}{4} \tanh ^{-1}(a x)^2+\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}+\frac {1}{3} \tanh ^{-1}(a x)^3+\tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-\tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )+a \int \frac {\text {Li}_2\left (-1+\frac {2}{1+a x}\right )}{1-a^2 x^2} \, dx\\ &=\frac {1}{4 \left (1-a^2 x^2\right )}-\frac {a x \tanh ^{-1}(a x)}{2 \left (1-a^2 x^2\right )}-\frac {1}{4} \tanh ^{-1}(a x)^2+\frac {\tanh ^{-1}(a x)^2}{2 \left (1-a^2 x^2\right )}+\frac {1}{3} \tanh ^{-1}(a x)^3+\tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-\tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )-\frac {1}{2} \text {Li}_3\left (-1+\frac {2}{1+a x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.10, size = 106, normalized size = 0.78 \begin {gather*} \frac {1}{24} \left (i \pi ^3-8 \tanh ^{-1}(a x)^3+3 \cosh \left (2 \tanh ^{-1}(a x)\right )+6 \tanh ^{-1}(a x)^2 \cosh \left (2 \tanh ^{-1}(a x)\right )+24 \tanh ^{-1}(a x)^2 \log \left (1-e^{2 \tanh ^{-1}(a x)}\right )+24 \tanh ^{-1}(a x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(a x)}\right )-12 \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(a x)}\right )-6 \tanh ^{-1}(a x) \sinh \left (2 \tanh ^{-1}(a x)\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcTanh[a*x]^2/(x*(1 - a^2*x^2)^2),x]

[Out]

(I*Pi^3 - 8*ArcTanh[a*x]^3 + 3*Cosh[2*ArcTanh[a*x]] + 6*ArcTanh[a*x]^2*Cosh[2*ArcTanh[a*x]] + 24*ArcTanh[a*x]^
2*Log[1 - E^(2*ArcTanh[a*x])] + 24*ArcTanh[a*x]*PolyLog[2, E^(2*ArcTanh[a*x])] - 12*PolyLog[3, E^(2*ArcTanh[a*
x])] - 6*ArcTanh[a*x]*Sinh[2*ArcTanh[a*x]])/24

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 116.12, size = 1290, normalized size = 9.49

method result size
derivativedivides \(\text {Expression too large to display}\) \(1290\)
default \(\text {Expression too large to display}\) \(1290\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctanh(a*x)^2/x/(-a^2*x^2+1)^2,x,method=_RETURNVERBOSE)

[Out]

-1/8*arctanh(a*x)*(a*x-1)/(a*x+1)+1/8*arctanh(a*x)*(a*x+1)/(a*x-1)-1/4*I*Pi*arctanh(a*x)^2*csgn(I/((a*x+1)^2/(
-a^2*x^2+1)+1))*csgn(I*(a*x+1)^2/(a^2*x^2-1))*csgn(I*(a*x+1)^2/(a^2*x^2-1)/((a*x+1)^2/(-a^2*x^2+1)+1))-2*polyl
og(3,-(a*x+1)/(-a^2*x^2+1)^(1/2))-2*polylog(3,(a*x+1)/(-a^2*x^2+1)^(1/2))+1/2*I*Pi*arctanh(a*x)^2*csgn(I*((a*x
+1)^2/(-a^2*x^2+1)-1))*csgn(I/((a*x+1)^2/(-a^2*x^2+1)+1))*csgn(I*((a*x+1)^2/(-a^2*x^2+1)-1)/((a*x+1)^2/(-a^2*x
^2+1)+1))+1/2*I*Pi*arctanh(a*x)^2*csgn(I*(a*x+1)/(-a^2*x^2+1)^(1/2))*csgn(I*(a*x+1)^2/(a^2*x^2-1))^2+1/4*I*Pi*
arctanh(a*x)^2*csgn(I*(a*x+1)/(-a^2*x^2+1)^(1/2))^2*csgn(I*(a*x+1)^2/(a^2*x^2-1))-1/2*I*Pi*arctanh(a*x)^2*csgn
(I*((a*x+1)^2/(-a^2*x^2+1)-1))*csgn(I*((a*x+1)^2/(-a^2*x^2+1)-1)/((a*x+1)^2/(-a^2*x^2+1)+1))^2-1/2*I*Pi*arctan
h(a*x)^2*csgn(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a*x+1)-1/16*(a*x-1)/(a*x+1)-1/16*(a*x+1)/(a*x-1)+arctanh(a*x)^2*ln(2)+arctanh(a*x)^2*
ln((a*x+1)/(-a^2*x^2+1)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(a*x)^2/x/(-a^2*x^2+1)^2,x, algorithm="maxima")

[Out]

1/4*a^4*integrate(x^4*log(a*x + 1)*log(-a*x + 1)/(a^4*x^5 - 2*a^2*x^3 + x), x) + 1/4*a^3*integrate(x^3*log(a*x
 + 1)*log(-a*x + 1)/(a^4*x^5 - 2*a^2*x^3 + x), x) - 1/32*(a*(2/(a^4*x - a^3) - log(a*x + 1)/a^3 + log(a*x - 1)
/a^3) + 4*log(-a*x + 1)/(a^4*x^2 - a^2))*a^2 - 1/4*a^2*integrate(x^2*log(a*x + 1)*log(-a*x + 1)/(a^4*x^5 - 2*a
^2*x^3 + x), x) - 1/4*a*integrate(x*log(a*x + 1)*log(-a*x + 1)/(a^4*x^5 - 2*a^2*x^3 + x), x) + 1/4*a*integrate
(x*log(-a*x + 1)/(a^4*x^5 - 2*a^2*x^3 + x), x) - 1/24*((a^2*x^2 - 1)*log(-a*x + 1)^3 + 3*((a^2*x^2 - 1)*log(a*
x + 1) + 1)*log(-a*x + 1)^2)/(a^2*x^2 - 1) + 1/4*integrate(log(a*x + 1)^2/(a^4*x^5 - 2*a^2*x^3 + x), x) - 1/2*
integrate(log(a*x + 1)*log(-a*x + 1)/(a^4*x^5 - 2*a^2*x^3 + x), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(a*x)^2/x/(-a^2*x^2+1)^2,x, algorithm="fricas")

[Out]

integral(arctanh(a*x)^2/(a^4*x^5 - 2*a^2*x^3 + x), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}^{2}{\left (a x \right )}}{x \left (a x - 1\right )^{2} \left (a x + 1\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atanh(a*x)**2/x/(-a**2*x**2+1)**2,x)

[Out]

Integral(atanh(a*x)**2/(x*(a*x - 1)**2*(a*x + 1)**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(a*x)^2/x/(-a^2*x^2+1)^2,x, algorithm="giac")

[Out]

integrate(arctanh(a*x)^2/((a^2*x^2 - 1)^2*x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atanh}\left (a\,x\right )}^2}{x\,{\left (a^2\,x^2-1\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atanh(a*x)^2/(x*(a^2*x^2 - 1)^2),x)

[Out]

int(atanh(a*x)^2/(x*(a^2*x^2 - 1)^2), x)

________________________________________________________________________________________